#include "delay.h"
#include "board.h"

volatile uint32_t g_systickCounter;
extern uint32_t SystemCoreClock;

void SysTick_Handler(void)
{
    if (g_systickCounter != 0U)
    {
        g_systickCounter--;
    }
}

void SysTick_DelayTicks(uint32_t n)
{
    g_systickCounter = n;
    while (g_systickCounter != 0U)
    {
    }
}

void SysTick_Init(uint16_t dev)
{
		while(SysTick_Config(SystemCoreClock / dev));
}





